package mx.com.crowdgine.display.animation.skinning;

import org.junit.Assert;
import org.junit.Test;

public class ImageBasedSkinningEncoderTest {

	
	@Test
	public void test() {
		
		String objFilePath = "../crowdgine-game/Assets/Models/mrT.obj";
		String jointImageFilePath = "../crowdgine-game/Assets/Textures/joints.bmp";
		ImageBasedSkinningEncoder encoder = new ImageBasedSkinningEncoder(objFilePath, jointImageFilePath);
		
		
		int i = 0;
		for(float data : encoder.getJointData()) {
			System.out.println("data[" + i + "]: " + data);
			i++;
		}
		
		Assert.assertEquals(31, encoder.getJointIds().size());
		
		for(int j = 0; j < encoder.getJointIds().size(); j++) {
			Integer id = encoder.getJointIds().get(j);
			System.out.println("Joint id: " + id);
			Assert.assertEquals(new Integer(j), id);
		}
		
		
	}
}
